package com.advertisementsystem.entity;

import com.advertisementsystem.Dto.TimeSlot;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.List;

import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;


@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("ad_negotiation")
public class AdNegotiation implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 记录ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 广告ID
     */
    private Long adId;

    /**
     * 广告主ID
     */
    private Long advertiserId;

    /**
     * 设备拥有者ID
     */
    private Long deviceOwnerId;

    private Long deviceId;
    /**
     * 协商内容
     */
    private String content;

    /**
     * 状态：0-进行中 1-已达成 2-已取消
     */
    private Integer status;

    /**
     * 创建时间
     */
    private LocalDateTime createdTime;

    /**
     * 更新时间
     */
    private LocalDateTime updatedTime;


    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<TimeSlot> timeSlots;

    private BigDecimal price;
}
